<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
   <head>
    	<title></title>   
		<s:include value="../../common/source.jsp"></s:include>
		<script src="js/member.js"></script>
  </head>
  <body>
    <div class="body">
          <div class="content ui-sortable">
          <div class="list">
          	学位论文列表
          	</div>
          	</div>
          	<br/>
          	<s:if test="flag==4">
          	  <!-- 打印报表 -->
          	  
          	  
         <div class="load0">
        <form action="admin/PaperFileCreateAction.action" method="post">
        <input type="hidden" name="name" value=${name }>
        <input type="hidden" name="flag" value=${flag }>
        <input type="hidden" name="date1" value=${date11 }>
        <input type="hidden" name="date2" value=${date22 }>
        <input type="submit" class="load0" value="下载Excel">
        </form> 
         </div>
         </s:if>

           <br>	
           <hr style="background-color:#cfe1f9;height:1px;"/> 
    <table class="sui-table table-primary table-sideheader ta-width">
          <thead>
            <tr>
               <th style="width:5%;text-align:center">序号</th>
              <th style="width:40%">名称</th>
              <th style="width:10%">获奖等级</th>                        
              <th style="width:10%">所属学生姓名</th>                        
              <th style="width:10%">所属老师姓名</th>                        
              <th style="width:5%">下载</th>
            </tr>
          </thead>
          <tbody>
          <s:iterator value="stuPapers" status="papers"> 
            <tr>
              <td  style="text-align:center"></td>
              <td><s:property value="degname"/></td>
              <td>
              <s:if test="degaward==0">国优</s:if>
              <s:elseif test="degaward==1">省优</s:elseif>
              <s:elseif test="degaward==2">校优</s:elseif>
              </td>
                          
              <td>
              <a href="teacher/oneStu.action?stuId=<s:property value="students[#papers.count-1].stuId"/>&power=1"><s:property value="students[#papers.count-1].name"/></a>
              </td>
              <td>
             <s:property value="teachers[#papers.count-1].name"/>
              </td>
             
             
              <td>
              <s:if test="upload==''||upload==null">
             <font color="#cccccc">下载</font>
              </s:if>
              <s:else>
               <a href="admin/FruitsFileDownloadAction.action?nameCom=<s:property value="upload"/>">下载</a>
              </s:else>
              </td>                          
              </tr> 
           </s:iterator>       
          </tbody>
        </table>  
        
        	       <!--**************************** 开始进行分页显示 *******************************-->
        	      
        <div align="center" style="font-size: 12px">
         <!-- **************************************全部的分页****************** -->
         <!-- *****************************************学科管理员的分页****************** -->
                     <s:if test="flag!=1">
							<s:if test="currentPage!=1">
								<a href="admin/StudentPaperAction.action?currentPage=1">首页</a> | 
								<a href="admin/StudentPaperAction.action?currentPage=<s:property value="currentPage-1"/>">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="admin/StudentPaperAction.action?currentPage=<s:property value="currentPage+1"/>">下一页</a> | 
								<a href="admin/StudentPaperAction.action?currentPage=<s:property value="endPage"/>">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
					 </s:if>
         <!-- *****************************************方向管理员的分页****************** -->
                     <s:elseif test="flag==1">
							<s:if test="currentPage!=1">
								<a href="leader/DirectStudentPaperAction.action?currentPage=1">首页</a> | 
								<a href="leader/DirectStudentPaperAction.action?currentPage=<s:property value="currentPage-1"/>">上一页</a>
							</s:if>
							<s:if test="currentPage!=endPage&&endPage!=0">
								<a href="leader/DirectStudentPaperAction.action?currentPage=<s:property value="currentPage+1"/>">下一页</a> | 
								<a href="leader/DirectStudentPaperAction.action?currentPage=<s:property value="endPage"/>">尾页</a>
							</s:if>
							<s:if test="currentPage==1&&counts==0">
							<div>对不起，你所查找的数据条数为0！</div>
							</s:if>
					 </s:elseif>
		                
						</div>	
       
        
        <!-- ****************日期显示******************** -->
        <script type="text/javascript">

	    var d = new Date();
		var date = d.getFullYear();
		var uu=document.getElementById("menu4");
		var tt=document.getElementById("menu6");
		var aa=uu.getElementsByTagName("a");
		var bb=tt.getElementsByTagName("a");
		
		   for(var i=0; i<aa.length;i++) 
		   {
		   	aa[i].innerHTML=date;
		   	//aa[i].value=date;a
		   	aa[i].setAttribute('value', date);
		   	date--;
		   } 
		   var date = d.getFullYear();
		   for(var i=0; i<bb.length;i++) 
		   {
		   	bb[i].innerHTML=date;
		   	bb[i].setAttribute('value',date);
		   	date--;
		   	aa[i].value=date;
		   } 
        
        </script>
        </div>
  </body>
</html>